#pragma once

class CInteger
{
public:
    CInteger(int nValue = 0)
    {
        m_nValue = nValue;
    }
    CInteger(const CInteger& other)
    {
        m_nValue = other.m_nValue;
    }
    CInteger(CInteger&& other)
    {
        m_nValue = other.m_nValue;
    }

    ~CInteger()
    {
    }

    CInteger& operator=(const CInteger& other)
    {
        return operator=(other.m_nValue);
    }

    CInteger& operator=(const CInteger&& other)
    {
        return operator=(other.m_nValue);
    }

    CInteger& operator=(int nValue)
    {
        this->m_nValue = nValue;
        return *this;
    }

    bool operator==(int nValue)
    {
        return m_nValue == nValue;
    }
    bool operator==(const CInteger& other)
    {
        return m_nValue == other.m_nValue;
    }

    operator int() const
    {
        return m_nValue;
    }

private:
    int m_nValue;
};

